<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
         @font-face {
            font-family: num;
            src: local('PingFang SC'),
            local('PingFang SC Light'),
            local('Source Han Sans CN'),
            local('Noto Sans CJK SC'),
            local("Microsoft Yahei");
            size-adjust: 250%;
            unicode-range: U+30-39;
        }
        @property --t { 
            syntax: '<integer>';
            inherits: false;
            initial-value: 0;
        }
       
        @counter-style 太棒了 {
            system: cyclic;
            symbols: '太棒了！！！';
            /* range: 51 infinite; */
        }
        @counter-style 加油 {
            system: cyclic;
            symbols: '加油！！';
            range: 1 50;
            fallback: 太棒了
        }
        @counter-style 鼓励 {
            system: cyclic;
            symbols: '鼓励！';
            range: 1 20;
            fallback: 加油
        }
        body{
            display: grid;
            place-content: center;
            height: 100vh;
            margin: 0;
            gap: 10px;
        }
        .like{
            position: relative;
        }
        .like::after{
            position: absolute;
            bottom: 100%;
            width: max-content;
            font-size: 2rem;
            font-style: italic;
            font-weight: bolder;
            background-image: linear-gradient(#FFCF02, #FF7352);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            counter-reset: time var(--t);
            content:counter(time)  counter(time, 鼓励);
            animation: count 100s steps(999) forwards;
            animation-play-state: paused;
            transform: translateY(100%);
            opacity: 0;
            visibility: hidden;
            transition: .3s .3s, 0s .6s transform;
        }
        @keyframes count {
            to {
                --t: 999;
            }
        }
        .like:active::after{
            animation-play-state: running;
            visibility: visible;
            opacity: 1;
            transition: .3s;
            transform: translateY(0);
        }
    </style>
</head>
<body>
    <button class="like">长按点赞</button>
</body>
</html>